package com.hxzy.mapper;

import com.hxzy.controller.admin.orders.req.OrdersReq;
import com.hxzy.controller.admin.orders.resp.OrderViewResp;
import com.hxzy.controller.admin.orders.resp.OrdersResp;
import com.hxzy.controller.admin.orders.resp.OrdersStatisticResp;
import com.hxzy.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【orders(订单表)】的数据库操作Mapper
* @createDate 2023-06-28 16:38:44
* @Entity com.hxzy.entity.Orders
*/
public interface OrdersMapper extends BaseMapper<Orders> {

    /**
     * 根据订单查询商家名称
     * @param orderNumber
     * @return
     */
    String searchByMerchandiserName(String orderNumber);

    /**
     * 分页查询
     * @param req
     * @return
     */
    List<OrdersResp> search(@Param(value = "req") OrdersReq req);

    /**
     * 统计订单状态
     * @param status  状态
     * @param merchantId 商家ID
     * @return
     */
    int ordersStatistic(@Param(value = "status") String status, @Param(value = "merchantId") Long merchantId);


}




